package com.ruoyi.system.domain;

import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;

/**
 * 用户播放记录对象 mine_user_playback_record
 * 
 * @author ruoyi
 * @date 2025-01-14
 */
public class MineUserPlaybackRecord extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 记录ID */
    private Long recordId;

    /** 用户ID */
    @Excel(name = "用户ID")
    private Long userId;

    /** 视频ID */
    @Excel(name = "视频ID")
    private Long videoId;

    /** 培训ID */
    @Excel(name = "培训ID")
    private Long trainingId;

    /** 观看进度（秒） */
    @Excel(name = "观看进度", readConverterExp = "秒=")
    private Long progress;

    /** 是否完成观看 */
    @Excel(name = "是否完成观看")
    private Integer isCompleted;

    /** 最后播放时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "最后播放时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date lastPlayedAt;

    public void setRecordId(Long recordId) 
    {
        this.recordId = recordId;
    }

    public Long getRecordId() 
    {
        return recordId;
    }
    public void setUserId(Long userId) 
    {
        this.userId = userId;
    }

    public Long getUserId() 
    {
        return userId;
    }
    public void setVideoId(Long videoId) 
    {
        this.videoId = videoId;
    }

    public Long getVideoId() 
    {
        return videoId;
    }
    public void setTrainingId(Long trainingId) 
    {
        this.trainingId = trainingId;
    }

    public Long getTrainingId() 
    {
        return trainingId;
    }
    public void setProgress(Long progress) 
    {
        this.progress = progress;
    }

    public Long getProgress() 
    {
        return progress;
    }
    public void setIsCompleted(Integer isCompleted) 
    {
        this.isCompleted = isCompleted;
    }

    public Integer getIsCompleted() 
    {
        return isCompleted;
    }
    public void setLastPlayedAt(Date lastPlayedAt) 
    {
        this.lastPlayedAt = lastPlayedAt;
    }

    public Date getLastPlayedAt() 
    {
        return lastPlayedAt;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("recordId", getRecordId())
            .append("userId", getUserId())
            .append("videoId", getVideoId())
            .append("trainingId", getTrainingId())
            .append("progress", getProgress())
            .append("isCompleted", getIsCompleted())
            .append("lastPlayedAt", getLastPlayedAt())
            .toString();
    }
}
